<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>考试</title>
<!--外部引入-->
    <link rel="stylesheet" th:href="@{/libs/bootstrap/bootstrap4dist/css/bootstrap.css}">
	<link rel="stylesheet" th:href="@{/css/student/mainpage.css}">
	<link rel="stylesheet" th:href="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_bootstrap-table.min.css}">
</head>
<body>
<div>
	<h1>考试</h1>
	<!-- 新增按钮 -->
				<button type="button" class="btn btn-primary" data-toggle="modal"
				data-target="#addmodal" data-whatever="@mdo">新增</button>
	<div>
		<table id="tab" data-pagination="true" data-page-size="4" data-search="true"><!--是分页data-pagination="true" data-page-size="4" data-search="true"-->
		</table>
	</div>
	<div>
		<input id="addr" hidden th:value="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()} " />
		<!-- 获取到controller路径 -->
	</div>
	
	<div>
			<!-- 新增 -->
			<div class="modal fade" id="addmodal" tabindex="-1"
				aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLabel">新增商品信息</h5>
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body">
							<form>
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品名称</label> 
									<input type="text" class="form-control" id="add-goodsName">
								</div>
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品数量</label> 
									<input type="text" class="form-control" id="add-goodsAmount">
								</div>
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品类型</label> 
									<input type="text" class="form-control" id="add-goodsType">
								</div>
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-secondary"
								data-dismiss="modal">取消</button>
							<button type="button" onclick="save()" class="btn btn-primary">确认</button>
						</div>
					</div>
				</div>
			</div>
			
			<!-- 删除模态框 -->
		<!-- <div>
			<div class="modal fade" id="deletemodal" tabindex="-1"
				aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLabel">删除学生信息</h5>
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						
						<div class="modal-footer">
							<button type="button" class="btn btn-secondary"
								data-dismiss="modal">取消</button>
							<button type="button" onclick="deleteStudent()" class="btn btn-primary">确认</button>
						</div>
					</div>
				</div>
			</div>
		</div> -->
		
		<div>
			<!-- 修改 -->
			<div class="modal fade" id="updatemodal" tabindex="-1"
				aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLabel">修改教室信息</h5>
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body">
							<form>
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品名称</label> 
									<input type="text" class="form-control" id="update-goodsName">
								</div>
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品数量</label> 
									<input type="text" class="form-control" id="update-goodsAmount">
								</div>		
								<div class="form-group">
									<label for="recipient-name" class="col-form-label">商品类型</label> 
									<input type="text" class="form-control" id="update-goodsType">
								</div>			
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-secondary"
								data-dismiss="modal">取消</button>
								<input type="text" class="form-control" hidden="hidden" id="pkId">
							<button type="button" onclick="updata()" class="btn btn-primary">确认</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!--外部引入-->
	<script th:src="@{/libs/jquery/jquery-3.5.1.js}"></script>
	<script th:src="@{/libs/bootstrap/bootstrap4dist/js/bootstrap.js}"></script>
	<script th:src="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_bootstrap-table.min.js}"></script>
	<script th:src="@{/libs/bootstrap-table/unpkg.com_bootstrap-table@1.15.3_dist_locale_bootstrap-table-zh-CN.min.js}"></script>
	<script th:src="@{/js/kaoshi2/kaoshi2.js}"></script>
</body>
</html>